<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">
        #editForm {
            width: 320px;
            line-height: 2;
        }
        #editForm label.fieldname {
            width: 90px;
            display: inline-block;
            text-align: right;
            padding-right: 10px;
        }
        .error {
            color: red;
        }
    </style>
	<title>登录</title>
</head>
<body>
	<form action="${pageContext.request.contextPath}/account/checklogin" method="post">
    <fieldset id="editForm">
        <legend>用户登录</legend>
        <div>
            <label class="fieldname">用户名</label>
            <input type="text" name="username" />
        </div>
        <div>
            <label class="fieldname">密码</label>
            <input type="password" name="password" />
        </div>
        <div>
            <label class="fieldname">&nbsp;</label>
            <input type="submit" value="登录" />
        </div>
        <c:if test="${param.error!=null}">
        <p style="color:red;text-align: center;line-height: 1;">用户名或密码有误。</p>
        </c:if>
        <c:if test="${param.logout != null}">
		<p style="color:red;text-align: center;line-height: 1;">登录已注销。</p>
		</c:if>
        <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
    </fieldset>
    </form>
</body>
</html>